/*
 * @Author: your name
 * @Date: 2021-09-24 08:52:37
 * @LastEditTime: 2021-09-24 16:23:27
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \led\main.c
 */
#include <stdio.h>
#include <wiringSerial.h>
#include "uart.h"

int uart_init(void)
{
	int sd = 0;
	sd = openSerial(UART_NAME,UART_BAUDRATE)
	if(-1 == sd)
	{
		printf("uart open failed\r\n");
	}
	return sd; 
}

int uart_send(int sd,char *buf)
{
	if(-1 == sd)
	{
		return sd;
	}
    serialPuts(sd,buf);

	return 0;
}

